﻿@using VirtualPress.Infrastructure.Entities.Entity;
@using VirtualPress.Tool.Framework;
@using VirtualPress.Infrastructure.Entities.Enum;
@{
    ViewBag.Title = "ArticleDetail";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
<link type="text/css" rel="Stylesheet" href="/content/css/select2.css" />
<div id="content-header">
    <h1>
        稿件详情</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/Member/Index" class="tip-bottom"><i class="icon-home"></i>起始页</a>
    <a class="current">稿件详情</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span8">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-pencil"></i></span>
                    <h5>
                        期刊投稿</h5>
                    <h5 style="float: right; color: Red;">
                        *为必填</h5>
                </div>
                @{
                    Periodical journal = ViewBag.Journal;
                    Article article = ViewBag.Article;
                    List<ArticleAuthor> author = ViewBag.ArticleAuthor;
                    List<Appendix> Attachment = ViewBag.Attachment;
                }
                <div class="widget-content nopadding">
                    <form class="form-horizontal" method="post" action="#">
                    <input type="hidden" name="ArticleId" value="@article.Id" />
                    <div class="step">
                        <div class="control-group">
                            <label class="control-label">
                                期刊名称</label>
                            <div class="controls">
                                <label>@journal.Name</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                稿件标题 (*)</label>
                            <div class="controls">
                                <label>@article.Title</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                英文标题 (*)</label>
                            <div class="controls">
                                <label>@article.Title_EN</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                稿件范围</label>
                            <div class="controls">
                                <label>@article.GJFW.Replace(";","、 ")</label>
                            </div>
                        </div>
                        <div id="authorbox" class="control-group">
                            <label class="control-label">
                                添加作者 (*)</label>
                            <div class="controls">
                                @foreach (var item in author)
                                { 
                                    @Html.Raw(item.AuthorName + " ")
                                }
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                摘要 (*)</label>
                            <div class="controls">
                                <p>@article.Abstract</p>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                关键字 (*)</label>
                            <div class="controls">
                                <label>@article.KeyWords</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                摘要(ENGLISH) (*)</label>
                            <div class="controls">
                                <p>@article.Abstract_EN</p>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                关键字(ENGLISH) (*)</label>
                            <div class="controls">
                                <label>@article.KeyWords_EN</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                稿件 (*)</label>
                            <div class="controls">
                                <ul>
                                @if (Attachment != null && Attachment.Any())
                                {
                                    foreach (var att in Attachment)
                                    { 
                                    <li><a target="_blank" title="点击下载" href="/download?token=@EncodeByBase64.Encode(new { id = att.Id, type = 9 }.ToJson())">
                                        <i class="icon-file icon-large"></i>
                                        @att.FileName;</a>
                                        <span style="color:#999;font-style: italic;padding-left:25px;">@att.CreateTime.ToString("yyyy-MM-dd")</span>
                                    </li>
                                    }
                                }
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="form-actions">
                        <a class="btn btn-primary" href="/workspace/member/article?type=-1">返回</a>
                    </div>
                    <div id="submitted">
                    </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="span4">
            <div class="accordion widget-box" id="collapse-group">
                <div class="accordion-group widget-box">
                    <div class="accordion-heading">
                        <div class="widget-title">
                            <a data-parent="#collapse-group" href="#collapseGOne" data-toggle="collapse"><span
                                class="icon"><i class="icon-magnet"></i></span>
                                <h5>
                                    稿件历史记录</h5>
                            </a>
                        </div>
                    </div>
                    <div class="accordion-body collapse" id="collapseGOne">
                        <div class="widget-content">
                            <ul class="activity-list">
                                @{
                                    List<ArticleHistory> his = ViewBag.History;
                                    if (his != null && his.Any())
                                    {
                                        foreach (var item in his)
                                        {
                                        <li>
                                            <a href="javascript:;">
                                                <i class="icon-chevron-right"></i>
                                                <strong>@item.Message</strong>
                                                @item.CurrentStatus.Mapping()
                                                <span>@item.CreateTime.ToString("yyyy-MM-dd")</span>
                                            </a>
                                        </li>
                                        }
                                    }
                                }
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="accordion-group widget-box">
                    <div class="accordion-heading">
                        <div class="widget-title">
                            <a data-parent="#collapse-group" href="#collapseGTwo" data-toggle="collapse"><span
                                class="icon"><i class="icon-magnet"></i></span>
                                <h5>
                                    审稿记录</h5>
                            </a>
                        </div>
                    </div>
                    <div class="accordion-body in collapse" id="collapseGTwo" >
                        <div class="widget-content">
                            <ul class="activity-list">
                                @{
                                    List<AuditingRecord> record = ViewBag.AuditingRecord;
                                    if (record != null && record.Any())
                                    {
                                        foreach (var item in record)
                                        {
                                        <li>
                                            <a href="javascript:;">
                                                <i class="icon-chevron-right"></i>
                                                <strong>@item.Step.Mapping()</strong>
                                                @item.ExamineStatus.Mapping()
                                                <span>@item.CreateTime.ToString("yyyy-MM-dd")</span>
                                                @if (!String.IsNullOrEmpty(@item.Message))
                                                {
                                                    <i style="float:right;" title="@item.Message" class="icon-comment"></i>
                                                }
                                            </a>
                                        </li>
                                        }
                                    }
                                    else
                                    {
                                    <li>
                                    <a href="javascript:;">
                                        <i class="icon-chevron-right"></i>
                                        暂无记录
                                    </a></li>
                                    }
                                }
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section tail
{
    <script type="text/javascript">
        $(function () {
            $('#likarticle').addClass('active open');
        });
    </script>
}
